package me.pearjelly.model;

import java.io.Serializable;

import com.drew.metadata.Metadata;

@SuppressWarnings("serial")
public class Image implements Serializable {
	private PageContext pageContext;
	private Metadata metadata;
	private Crawler crawler;

	public Image() {
	}

	public Image(PageContext pageContext, Metadata metadata, Crawler crawler) {
		this.pageContext = pageContext;
		this.metadata = metadata;
		this.crawler = crawler;
	}

	public PageContext getPageContext() {
		return pageContext;
	}

	public void setPageContext(PageContext pageContext) {
		this.pageContext = pageContext;
	}

	public Metadata getMetadata() {
		return metadata;
	}

	public void setMetadata(Metadata metadata) {
		this.metadata = metadata;
	}

	public Crawler getCrawler() {
		return crawler;
	}

	public void setCrawler(Crawler crawler) {
		this.crawler = crawler;
	}

	@Override
	public String toString() {
		return pageContext != null ? "[url="
				+ pageContext.getWebURL().getURL().toLowerCase() + "]" : super
				.toString();
	}
}
